/*
 * @Descripttion:
 * @version:
 * @Author: caiailing
 * @Date: 2023-03-29 14:42:43
 * @LastEditors:
 * @LastEditTime: 2023-04-04 17:30:02
 */
export default defineStore(
  'setup',
  () => {
    const name = ref<string>('allen')
    const token = ref<string>('token...')

    const fullName = computed(() => {
      return `${name.value} ttk`
    })

    const updateName = (val: string) => {
      name.value = val
    }
    return {
      name,
      token,
      fullName,
      updateName
    }
  },
  {
    persist: {
      enabled: true
    }
  }
)
